1. Field of the Invention
This invention relates to a contactless IC card, a responding method, and a program thereof, and more specifically the contactless IC card, the responding method, and the program that enable to respond to a request sent from a reader/writer by means of a value calculated on the basis of a random number.
2. Prior Art of the Invention
Generally, the time slot method has been applied to the communication between a contactless IC card and a reader/writer; the contactless IC card for sending and receiving data by means of the electromagnetic induction method and the reader/writer for recognizing the contactless IC card. This is because; if a plurality of contactless IC cards exist at a time within a communication area of a reader/writer and when the plurality of contactless IC cards respond to the polling of the reader/writer at a time, each response signal used for the response is in collision with each other and no contactless IC card can communicate with the reader/writer normally.
The communication of the time slot method will be explained hereafter.
(1) In order to recognize the existence of the contactless IC card, the reader/writer sends as a request an initial request to the contactless IC card. The initial request includes slot numbers needed for the timing control of the initial response executed by the contactless IC card or a value needed for calculating the slot numbers.
(2) The contactless IC card sends back the initial response by means of time slots (from 1 to slot numbers) started at intervals of a specific time immediately after the contactless IC card receives the initial request. The time slot is defined as a continuously repeating interval of time. Selecting the time slot can determine the timing for response. The timing for response, that is to say a time slot to be used for the response, can be determined on the basis of a random number by the card itself.
(3) If the reader/writer detects the collision of the initial responses, the collision generating when a plurality of contactless IC cards select the same time slot, the reader/writer resends an initial request and thereby a new time slot is selected. It is general that the time slot numbers included in the resent initial request is more than that in the previous initial request.
(4) The reader/writer recognizes all of contactless IC cards by normally receiving the initial responses from all of contactless IC cards and completes the sequence for identifying the contactless IC cards.
As such system, a wireless identification device is disclosed in Japanese laid-open publication No. 9-6934.
Besides, another method similar to the time slot method is a slot marker method. The slot maker method is a one that after sending out the initial request the reader/writer sends the slot marker command representing the start of the slot per the start timing of each slot.
In Japanese laid-open publication No. 9-6934, the wireless identification device has to decide the delay time using the random number after an ID card (a contactless IC card) receives a polling from a sending-receiving decoder (a reader/writer) until the card sends a response signal (a response), as described above.
In case of using a low-grade random number as the above-identified random number, that is a random number generated by a system generating biased random numbers at generating a random number in plural times, it happens frequently that a plurality of contactless IC cards generates the same random number. And so, it occurs many collisions of the initial response, which causes the reader/writer to delay the completion of the sequence for card identification. Otherwise, in the worst case, when the contactless IC card continues to generate the same random number, there is a problem that any sequence for the card identification is not completed. In case of applying a contactless IC card to a system like a ticket gate that users need to make a reader/writer recognize the contactless IC cards without intermission, the impediment occurs in the utilization of the system because of the delay of the card identification.
Therefore, instead of the low-grade random number, it is necessary to use a high-grade random number generated by a system not generating biased random numbers at generating a random number in plural times.
However, in order to acquire the high-grade random number, it is necessary to perform more complicated calculations than those for acquiring the low-grade random number. Therefore, in case of generating the high-grade random number by software, the software needs to use CPU (Central Processing Unit) capable of the high-speed processing. But using the CPU capable of the high-speed processing needs a huge volume of electric power. In this case, the power to be used by the CPU per unit time is small in the electromagnetic induction type of the power supplying method like a contactless IC card, and it is not possible to supply the electric power enough to generate the high-grade random number. Therefore when the calculation is executed for generating the high-grade random number by using the available power, it takes a long time. And in result, since the time slot ends before the calculations of the random number are completed, the contactless IC card cannot send the initial response. It is another problem.
In addition, the high-grade random number generally can be provided in a short time when the hardware generates them rather than when the software generates them. In this case, there is a problem that the device is complicated because a specific circuit is needed only for generating the random number, and it cause to increase the price. Particularly, the contactless IC card is restricted to its size and needs for the flexibility in some degree, therefore such impediment that the hardware provides the random number might be considered as a large problem.